package cn.maihe.elg.operation.supports.bank.ccb.ebs.dto;

import cn.maihe.elg.operation.model.dto.BaseReq;
import cn.maihe.elg.operation.supports.bank.ccb.ebs.util.CCBPayConstants;
import lombok.Data;

import javax.xml.bind.annotation.*;
import java.util.Date;

/**
 *
 * @author Alan
 * @version 1.0  2024/11/4
 */
@Data
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name="TX")
public class CCBEbsBaseReq extends BaseReq {
    private static final long serialVersionUID = -5479059987300379884L;

    /** 请求序列号	varChar(16)	只可以使用数字 */
    @XmlElement(name="REQUEST_SN")
    private String requestSn;
    /** 商户号	    varChar(21) 网银商户号 */
    @XmlElement(name="CUST_ID")
    private String custId;
    /** 操作员号	    varChar(6)  20051210 后必须使用 */
    @XmlElement(name="USER_ID")
    private String userId;
    /** 密码	        varChar(32) 操作员密码 */
    @XmlElement(name="PASSWORD")
    private String password;
    /** 交易码	    varChar(6)  交易请求码 */
    @XmlElement(name="TX_CODE")
    private String txCode;
    /** 语言	         varChar(2) CN */
    @XmlElement(name="LANGUAGE")
    private String language;

    public CCBEbsBaseReq(String custId, String userId, String password, String txCode) {
        this.requestSn = CCBPayConstants.yyMMddHHmmssSSS.format(new Date());
        this.custId = custId;
        this.userId = userId;
        this.password = password;
        this.txCode = txCode;
        this.language = "CN";
    }
}
